<ion-view title="申请购车款">
	<ion-header-bar align-title="left" class="bar-positive">
		<button ng-click="carapplymodal.remove()" class="button back-button buttons button-clear header-item" style="">
			<i class="icon ion-ios-arrow-back"></i> 
			<span class="back-text" style="transform: translate3d(0px, 0px, 0px);">
				<span class="default-title hide">返回</span>
				<span class="previous-title">返回</span>
			</span>
		</button>
		<h1 class="title" style="left: 0 !important; text-align: center;">申请购车款</h1>
	</ion-header-bar>
    <ion-content class="has-header ionic-pseudo" style="background:#f4f4f4;">
		<div class="apply-wp" style="background:#f4f4f4;">
			<div class="row car-tab">
				<div class="col" style="text-align: center;">
					<div class="withdrawals-img"></div>
					<h2 class="integral-h2">可支付</h2>
					<a href="#" class="button button-outline integral-btn" 
						style="color:#f69c00; border-color:#f69c00;" ng-bind="buycarinfo.cashwithdrawal"></a>
				</div>
				<div class="col" style="text-align: center;">
					<a  href="" ng-click="showtranseout()"  style="text-decoration: none;">
						<div class="withdrawals-Record-img"></div>
						<h2 class="integral-h2">支付记录</h2>
						<button class="button button-outline integral-btn" 
							style="color:#f69c00; border-color:#f69c00;"  ng-bind="buycarinfo.alreadwithdrawal">0</button>
					</a>
				</div>
			</div>
			<div class="list apply"  ng-if="applyshow">
				<div class="item" style="padding:.03rem;">
	            		<div class="row title" style="padding-left:.05rem;">
	            			<div class="col-10 title-list">选择</div>
	            			<div class="col-20 title-list">序号</div>
	            			<div class="col-33 title-list">促成人</div>
	            			<div class="col-10 title-list">级别</div>
	            			<div class="col-33 title-list" style="text-align: center;">金额</div>
	            		</div>
	            		<ul class="row content" ng-repeat="item in applyfacilitate">
					    <li class="item item-checkbox" style="width: 100%;height: .4rem; border-left: none; border-right: none; line-height: .4rem; padding-left: 20%;">
							<label class="checkbox">
					             <input type="checkbox" ng-model="item.memberid" id="{{item.facilitatekey}}"
	            					ng-checked="isSelected(item.facilitatekey)" ng-click="updateSelection($event, item)">
				           	</label>
							<label style="width: 10%; display: inline-block; text-align: center;">{{$index+1}}</label>
							<label style="width: 40%; display: inline-block; text-align: center;">{{item.membername}}</label>
							<label style="width: 20%; display: inline-block; text-align: center;">{{item.reference}}级</label>
							<label style="width: 20%; display: inline-block; text-align: right;">{{item.bonus}}</label>
						</li>
	            		</ul>
	            		<div class="row content">
	            			<div class="col col-offset-50" style="padding-top:.1rem;">
	            				总金额：<span class="total-amount" ng-bind="apply.applyAmount">0元</span>
	            			</div>
	            		</div>
	            </div>
			</div>
			<div  ng-if="applyshow">
			<div class="list" style="margin-top:.1rem; margin-bottom:0;">
				<div class="item item-divider integral-title" style="background:#fff; padding:.1rem 0 .1rem .1rem;">
					车辆信息
				</div>
				<a href="" ng-click="certificatemodel.show()"
					class="item item-icon-right" style="line-height:.36rem; padding-left:.1rem;">
					<span class="input-label" style="color:#656565;">购车凭证</span>
					<span class="icon upload">
						<img ng-src="{{img.fileimg}}" style="width: 30px;height: 40px;"
							ng-if="undefined != apply.applyVoucher && '' != apply.applyVoucher"/>
					</span>
				</a>
				<a class="item item-input" style="line-height:.36rem; padding-left:.1rem;">
					<span class="input-label" style="color:#656565;">车辆品牌</span>
					<input type="text" ng-model="apply.vehicle.brand">
				</a>
				<a class="item item-input" style="line-height:.36rem; padding-left:.1rem;">
					<span class="input-label" style="color:#656565;">车辆型号</span>
					<input type="text" ng-model="apply.vehicle.model">
				</a>
				<label class="item item-input" style="line-height:.36rem; padding-left:.1rem;">
					<span class="input-label" style="color:#656565;">VIN号</span>
					<input type="text" ng-model="apply.vehicle.vin">
				</label>
				<label class="item item-input" style="line-height:.36rem; padding-left:.1rem;">
					<span class="input-label" style="color:#656565;">车牌号</span>
					<input type="text" ng-model="apply.vehicle.carno">
				</label>
				<label class="item item-input" style="line-height:.36rem; padding-left:.1rem;padding-right: .2rem;">
					<span class="input-label" style="color:#656565;">购车金额</span>
					<input type="text" ng-model="apply.vehicle.price">¥
				</label>
			</div>
			<div class="list" style="margin-top:.1rem; margin-bottom:0;">
				<div class="item item-divider integral-title" style="background:#fff; padding:.1rem 0 .1rem .1rem;">
					4S店信息
				</div>
				<label class="item item-input" style="line-height:.36rem; padding-left:.1rem;">
					<span class="input-label" style="color:#656565;">名称</span>
					<input type="text" ng-model="apply.salesshop.shopname">
				</label>
				<a class="item item-input" style="line-height:.36rem; padding-left:.1rem;">
					<span class="input-label" style="color:#656565;">地址</span>
					<input type="text" ng-model="apply.salesshop.shopaddress">
				</a>
				<label class="item item-input" style="line-height:.36rem; padding-left:.1rem;">
					<span class="input-label" style="color:#656565;">银行开户名</span>
					<input type="text" ng-model="apply.salesshop.accountname">
				</label>
				<label class="item item-input" style="line-height:.36rem; padding-left:.1rem;">
					<span class="input-label" style="color:#656565;">银行账号</span>
					<input type="text" ng-model="apply.salesshop.cardno">
				</label>
				<label class="item item-input" style="line-height:.36rem; padding-left:.1rem;">
					<span class="input-label" style="color:#656565;">开户行</span>
					<input type="text" ng-model="apply.salesshop.accountbank">
				</label>
				<!--<div class="item item-input item-select"  style="line-height:.36rem; padding-left:.1rem;">
				    <div class="input-label" style="color:#656565;">
						开户行
					</div>
					<select>
						<option selected="">Alderaan</option>
						<option>1</option>
						<option>2</option>
					</select>
				</div>-->
				<label class="item item-input" style="line-height:.36rem; padding-left:.1rem;">
					<span class="input-label" style="color:#656565;">开户支行</span>
					<input type="text" ng-model="apply.salesshop.branche" >
				</label>
				<label class="item item-input" style="line-height:.36rem; padding-left:.1rem;">
					<span class="input-label" style="color:#656565;">联系人</span>
					<input type="text" ng-model="apply.salesshop.contactsname">
				</label>
				<label class="item item-input" style="line-height:.36rem; padding-left:.1rem;">
					<span class="input-label" style="color:#656565;">电话</span>
					<input type="text" ng-model="apply.salesshop.contactstel">
				</label>
			</div>
			<div class="apply-btn">
				<button class="button button-stable button-block"
					 ng-click="showcomfim()" style="background-color:#f69c00; color:#fff; border-color:#f69c00;">提交申请</button>
			</div>
			</div>
		</div>
	</ion-content>
</ion-view>

